The Color Space Conversions Applet


Select one or more color spaces by clicking on the buttons below. Each chosen color space will open as a separate Java frame. The frames are  synchronized, to show each color's representation in all color spaces simultaneously. All frames contain controls to specify color coordinates and have colored rectangles at the bottom indicating the current color. When you leave this page, all active frames are disposed of automatically. (Of course, you can also close any frame manually.)

Note that while CIE L*u*v* space is not implemented due to its similarity to L*a*b*, the conversion algorithm will be provided.

To see this in action you need Java-enabled browser. All frames are very easy to understand and work with. Here are some specifics:

RGB: The RGB frame contains the wire-frame RGB cube with colored vertices. The grey ball represents the current position. You can 3D-rotate the cube by dragging the mouse. The two dither planes, shown above the current color, represent the blue-magenta-red-black and green-yellow-red-black sides of the RGB cube, and are used to enter coordinates with the mouse (drag or point-and-click).

HSV: The HSV coordinate system is cylindrical, and the model is defined as a hexcone (six-sided pyramid turned upside down). Vertical position defines brightness, angular position - hue, and radial position - saturation. Saturation always ranges from 0 to 1, and specifies relative position from the vertical axis to the side of the hexcone. The colored hexagon on the left is a horizontal slice of the hexcone, shown on the right as a light-grey plane. The white cross indicates the current position (H and S values).

YIQ: The wire-frame RGB cube is shown now in the YIQ space (thus, deformed). It may be rotated as in the RGB frame. If the grey ball is moved outside of the "cube", it results in "Invalid RGB...".

CIE L*a*b*: L* defines lightness, a* denotes red/green value, and b* the yellow/blue value. A slice L*=const that produces the valid RGB values is shown. a* axis is horizontal, b* is vertical. When the white cross travels outside the slice, it results in "Invalid RGB...".

Note: Getting the "Invalid RGB" message is perfectly OK. It means that for a particular color space the color's current coordinates cannot be represented as valid RGB numbers. Indeed, the RGB gamut does not cover even all visible colors, let alone those that may be specified in other coordinate systems, and thus contain some invisible components (e.g., a "touch of infrared"). Putting constraints on the allowed coordinate ranges would make the user interface to the YIQ and LAB frames ambiguous, for dynamic range recalculations would result in all the controls being rescaled.